package cn.com.jinhao.hotline.commons.vo.business.finished;

import cn.com.jinhao.hotline.commons.vo.BaseRequestVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * hotline-spring-cloud
 * <p>Description: "办结入参类 </p>
 *
 * @author ShaneMew
 * @version 1.0
 * @date 2020/6/3
 * @since 2020/6/3
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "办结入参类")
public class FinishedRequestVO extends BaseRequestVO {
    @ApiModelProperty(value = "事件编码")
    @NotBlank(message = "事件编码(eventCode)不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "事件编码必须为数字")
    private String eventCode;

    @ApiModelProperty(value = "派单编码")
    @NotBlank(message = "派单编码(workOderCode)不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "派单编码必须为数字")
    private String dispatchCode;

    @ApiModelProperty(value = "办结部门编码")
    @NotBlank(message = "办结部门编码(deptCode)不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "办结部门编码必须为数字")
    private String deptCode;

    @ApiModelProperty(value = "办结部门")
    @NotBlank(message = "办结部门(dept)不能为空")
    private String dept;

    @ApiModelProperty(value = "办结人员编码")
    @NotBlank(message = "办结人员编码(operatorCode)不能为空")
    @Pattern(regexp = "^[0-9]*$", message = "办结人员编码必须为数字")
    private String operatorCode;

    @ApiModelProperty(value = "办结人员")
    @NotBlank(message = "办结人员(operator)不能为空")
    private String operator;

    @ApiModelProperty(value = "回访方式编码")
    @NotBlank(message = "回访方式编码(visitWayCode)不能为空")
    private String visitWayCode;

    @ApiModelProperty(value = "回访方式")
    @NotBlank(message = "回访方式(visitWay)不能为空")
    private String visitWay;

    @ApiModelProperty(value = "办结日期")
    @NotBlank(message = "办结日期(finishedDate)不能为空")
    @Pattern(regexp = "((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\\s([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$", message = "办结日期(finishedDate)日期格式不正确")
    private String finishedDate;

    @ApiModelProperty(value = "办结说明")
    @NotNull(message = "缺少办结说明(explanation)")
    @Size(max = 4000, message = "办结说明（explanation）不可以超过最大长度，最大长度为4000字符（2000中文)")
    private String explanation;
}
